{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 网页名称 -->
    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1-dist/css/bootstrap.css' %}">
    {% block css %}{% endblock %}
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar navbar-default">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="?">公司办公用品区域购买分析和销售预测系统</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                {% block nav %}{% endblock %}
            </ul>
            <form class="navbar-form navbar-left" method="post" action="/search/">
                {% csrf_token %}
                <div class="form-group">
                    <label class="sr-only" for="oid"></label>
                    <input style="width: 120px" type="text" id="oid" name="oid" class="form-control" placeholder="搜索订单">
                </div>
                <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                {% if request.user.is_authenticated %}
                    <li class="img-circle"><img src="/media/{{ request.user.avatar }}" alt="头像" height="40"
                                                style="margin-top: 5px"></li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                           aria-expanded="false" href="/home/{{ request.user.username }}/">
                            当前用户：{{ request.user.username }} <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="{% url 'logout' %}">切换账号</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="{% url 'logout' %}">退出登录</a></li>
                        </ul>
                    </li>
                {% else %}
                    <li><a href="{% url 'login' %}">登录</a></li>&emsp;
                    <li><a href="{% url 'register' %}">注册</a></li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>

{% block body %}{% endblock %}

<hr class="container modal-content divider">
<!-- 页脚 -->
<div class="container-fluid panel-footer">
    <table class="table">
    </table>
    <footer class="container">
        <p>
            &copy; 2024 | 公司办公用品区域购买分析和销售预测系统 |
            <a class="btn btn-xs btn-default" href="/admin/">后台入口</a>
        </p>
    </footer>
</div>

<!-- js -->
<script rel="script" src="{% static 'js/jquery-3.6.0.min.js' %}"></script>
<script rel="script" src="{% static 'plugins/bootstrap-3.4.1-dist/js/bootstrap.js' %}"></script>
<script rel="script" src="{% static 'js/echarts.js' %}"></script>
<!-- js代码 -->
{% block js %}{% endblock %}
</body>
</html>